package sg.edu.nus.iss.vmcs.maintenance;

import java.awt.event.*;
import java.awt.*;

public class PriceDisplayListener implements ActionListener {
	private MaintenanceController mctrl;

	public PriceDisplayListener(MaintenanceController mc) {
		mctrl = mc;
	}

	public void actionPerformed(ActionEvent e) {
		TextField txt;

		String sp;
		int ip;

		txt = (TextField) e.getSource();
		sp = txt.getText();

		ip = Integer.parseInt(sp);

		mctrl.setPrice(ip);
	}
}